import { h } from 'vue';
export function MinxfunssJ() {
  // 内涝
  let nlColumns = [
    {
      prop: 'deviceName',
      label: '监测点',
      format: false,
      // format: true,
      // render: (row) => `<span>${row.deviceName}</span>`,
    },
    {
      prop: 'waterLevel',
      label: '当前水位/m',
      format: false,
    },
    // {
    //   prop: 'thresholdWaterLevel',
    //   label: '预警阀值/m',
    //   format: false,
    // },
    {
      prop: 'insertTime',
      label: '报警时间',
      format: false,
    },
  ];

  // 防火
  let fhColumns = [
    {
      prop: 'pic',
      label: '图片',
      format: true,
      width: '80px',
      render: (row) =>
        h('img', { src: row.pic, style: { width: '50px', height: '50px' } }),
    },
    {
      prop: 'deviceName',
      label: '监测点',
      format: false,
    },
    {
      prop: 'eventCodeDesc',
      label: '事件类型',
      format: false,
      width: '80px',
    },
    {
      prop: 'monitorValue',
      label: '检测值°C',
      format: false,
      width: '75px',
    },
    {
      prop: 'eventTime',
      label: '报警时间',
      format: false,
    },
  ];

  // 潮位
  let cwColumns = [
    {
      prop: 'deviceName',
      label: '监测点',
      format: false,
      width: '150px',
    },
    {
      prop: 'waterLevelValue',
      label: '报警值',
      format: false,
      width: '80px',
    },
    {
      prop: 'thresholdValue',
      label: '阈值',
      format: false,
      width: '80px',
    },
    // {
    //   prop: 'spsb',
    //   label: '预警阀值/m',
    //   format: false,
    // },
    {
      prop: 'eventTime',
      label: '报警时间',
      format: false,
      width: '100px',
    },
  ];

  // 城管
  let cgColumns = [
    {
      prop: 'pic',
      width: '70px',
      label: '图片',
      format: true,
      render: (row) =>
        h('img', { src: row.pic, style: { width: '50px', height: '50px' } }),
    },
    {
      width: '120px',
      prop: 'deviceName',
      label: '监测点',
    },
    {
      prop: 'eventCodeDesc',
      label: '事件类型',
    },
    {
      width: '150px',
      prop: 'eventTime',
      label: '报警时间',
    },
  ];

  // 噪音
  let zyColumns = [
    {
      prop: 'deviceName',
      label: '监测点',
    },
    {
      prop: 'monitorValue',
      label: '实时噪音/分贝',
    },
    {
      prop: 'thresholdValue',
      label: '预警阀值/分贝',
    },
    {
      prop: 'eventTime',
      label: '报警时间',
    },
  ];

  // 垃圾倾倒
  let ljColumns = [
    {
      prop: 'url',
      label: '图片',
      format: true,
      render: (row) =>
        h('img', { src: row.pic, style: { width: '50px', height: '50px' } }),
    },
    {
      prop: 'deviceName',
      label: '监测点',
    },
    {
      prop: 'eventCodeDesc',
      label: '事件类型',
    },
    {
      prop: 'eventTime',
      label: '报警时间',
    },
  ];

  // 气象站
  let qxzColumns = [
    {
      prop: 'deviceName',
      label: '监测点',
    },
    {
      prop: 'eventCodeDesc',
      label: '事件类型',
    },
    {
      prop: 'monitorValue',
      label: '检测值',
    },
    // {
    //   prop: 'thresholdValue',
    //   label: '阈值',
    // },
    {
      prop: 'eventTime',
      label: '报警时间',
    },
  ];

  // 水场景
  let scColumns = [
    {
      prop: 'url',
      label: '监测点',
    },
    {
      prop: 'url',
      label: '溶解氧',
    },
    {
      prop: 'url',
      label: '报警时间',
    },
  ];

  // 事件场景
  let sqColumns = [
    {
      prop: 'pic',
      label: '图片',
      format: true,
      render: (row) =>
        h('img', { src: row.pic, style: { width: '50px', height: '50px' } }),
    },
    {
      prop: 'deviceName',
      label: '监测点',
    },
    {
      prop: 'eventCodeDesc',
      label: '事件类型',
    },
    {
      prop: 'eventTime',
      label: '报警时间',
    },
  ];

  return {
    sqColumns,
    nlColumns,
    fhColumns,
    cwColumns,
    cgColumns,
    zyColumns,
    ljColumns,
    qxzColumns,
    scColumns,
  };
}
